Skip to content

During uptodate ness check with buildInfo, check if there are errors explicitly with noEmit#50974

Merged
sheetalkamat merged 3 commits into
mainfrom
reBuildNoEmitErrors
Sep 27, 2022
Merged

During uptodate ness check with buildInfo, check if there are errors explicitly with noEmit#50974
sheetalkamat merged 3 commits into
mainfrom
reBuildNoEmitErrors

Conversation

@sheetalkamat
Copy link
Copy Markdown
Member

Fixes #50959

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Sep 27, 2022
Comment thread src/compiler/tsbuildPublic.ts Outdated
if (buildInfo.program) {
// If there are pending changes that are not emitted, project is out of date
// If noEmit, then explicitly check if there are semantic diagnostics
// affectedFilesPendingEmit is present in noEmit irrespective of errors to handle files to be emitted when noEmit is false,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This helps me understand why affectedFilesPendingEmit behaves differently under noEmit, but I don’t understand why that makes checking for the presence of semantic errors the correct fallback. Why does the presence of semantic errors definitely mean the buildinfo is out of date? Why isn’t the same true of syntactic errors?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If program has syntactic errors the changeFileSet because semantic diagnostics are not even processed in that case and state remains same. (https://github.com/microsoft/TypeScript/pull/50974/files#diff-2461280d51916bf4023650d8950c0af3bf16011e3f0c8a290c7c9f70056147a0R77) I will update the comment

@sheetalkamat sheetalkamat merged commit 16faef1 into main Sep 27, 2022
@sheetalkamat sheetalkamat deleted the reBuildNoEmitErrors branch September 27, 2022 22:57
@glasser
Copy link
Copy Markdown

glasser commented Oct 11, 2022

Do we know when this fix will be released? Looks like it didn't quite make it into 4.8.4. We are stuck on 4.7 until it's out.

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug